import request from "@/common/request.js";

//查询全部优惠券
export const queryCouponsApi = data => {
	return request.get({
		url: '/tube/admin/queryCoupons',
		data: data
	});
}


//查询用户拥有的优惠券
export const queryUserCouponsApi = data => {
	return request.get({
		url: '/tube/user/queryUserCoupons',
		data: data
	});
}

//用户领取优惠券
export const createUserCouponsApi = data => {
	return request.post({
		url: '/tube/user/createUserCoupons',
		data: data
	});
}

//修改用户拥有的优惠券的状态
export const updateUserCouponsApi = data => {
	return request.post({
		url: '/tube/user/updateUserCoupons',
		data: data
	});
}

